<%@page import="Product.ProductVo"%>
<%@page import="java.util.ArrayList"%>
<%@page import="Product.ProductMyba"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
function vi(){
	frm.action = 'index.jsp?inc_content=./product/product_view.jsp';
	frm.submit();
}
</script>
</head>
<body>
	<jsp:useBean id="vo" class="Product.ProductVo" />
	<jsp:setProperty property="*" name="vo" />
	<%
	
	
	ProductMyba product=new ProductMyba();
	product.setProductvo(vo);
	ArrayList<ProductVo> data=product.list2();
	%>
	
	<div id="PContent" class="panel panel-default" style="margin-top:33px;">
		<input type="hidden" name='nowPage' id='nowPage' value='<%=product.getNowPage() %>'>
			<div style="height:40px; border-top: 2px solid #eaeaea; border-bottom: 2px solid #eaeaea">
				<div style="float: left; width:30%; line-height: 40px; text-align: center; font-size: 20px;font-weight: bold;">상품명</div>
				<div style="float: left; width:15%; line-height: 40px; text-align: center; font-size: 20px;font-weight: bold;">대출기간</div>
				<div style="float: left; width:15%; line-height: 40px; text-align: center; font-size: 20px;font-weight: bold;">대출금리</div>
				<div style="float: left; width:15%; line-height: 40px; text-align: center; font-size: 20px;font-weight: bold;">상환방식</div>
				<div style="float: left; width:15%; line-height: 40px; text-align: center; font-size: 20px;font-weight: bold;">대출한도</div>
				<div style="float: left; width:10%; line-height: 40px; text-align: center; font-size: 20px;font-weight: bold;">사용여부</div>
			</div>
			<form name='frm' action="" method="post">
			<div onclick="vi()">
				<%
				for(int i=0; i<data.size(); i++){
					ProductVo pv=data.get(i);
					
				%>
					<input type="hidden" value="<%=pv.getPD_no() %>" name="PD_no">
					<div class='list' style="width:30%;" ><%=pv.getPD_nm() %></div>
					<div class='list' style="width:15%;"><%=pv.getPD_prd() %></div>
					<div class='list' style="width:15%;"><%=pv.getPD_rate() %></div>
					<div class='list' style="width:15%;"><%=pv.getPD_pback() %></div>
					<div class='list' style="width:15%;"><%=pv.getPD_max() %></div>
					<%if(pv.getPD_yn().equals("N")){ %>
					<div class='list' style="width:10%;color: #ff0000;"><%=pv.getPD_yn() %></div>
					<%}else if(pv.getPD_yn().equals("Y")){ %>
					<div class='list' style="width:10%;"><%=pv.getPD_yn() %></div><%} %>
				<%}%>
			</div>
			</form>
		</div>
		 <div id="PBottom">
			<div style="text-align: center; ">
				<!-- 페이지 분리 영역 -->
				
				<%
					for(int p=product.getStartPage(); p<=product.getEndPage();p++){
				%>
				<input type="button" value="<%=p%>"  class="btn btn-warning btn-xs" onclick="goPage('<%=p%>')" style="margin-top:15px;">
				<%
					}
				%>
			</div>
		</div> 
		<%
	String mid=(String)	session.getAttribute("mid");
		
		if(mid.equals("1408M001")){%>
		<input type="button" class="btn btn-danger" value="상품등록" onclick='pinsert()'style="float: right; margin-right:50px;">
		<%} %>

</body>
</html>